package com.hades.xq.miaoshao.service.model;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class UserModel {

    private Integer id;

    /**
     * 不能为null也不能为空字符串
     */
    @NotBlank(message = "用户名不能为空")
    private String name;

    @NotNull(message = "性别未填写")
    private Integer gender;

    @NotNull(message = "年龄未填写")
    @Min(value = 0, message = "年龄必须大于0岁")
    @Max(value = 150, message = "年龄必须小与150岁")
    private Integer age;

    @NotNull(message = "手机号未填写")
    private String telphone;

    private String registerModel;

    private String thirdPartyId;

    @NotNull(message = "密码未填写")
    private String encriptPassowrd;
}
